<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>智联同城——小程序管理系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">

    <link rel="stylesheet" href="__PUBLIC__/layui/css/layui.css"  media="all">
    <style type="text/css">

    </style>
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">智联同城</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item layui-this"><a href="{:U('Index/index')}">首页</a></li>
            <li class="layui-nav-item"><a href="{:U('InfoCate/index')}">分类信息管理</a></li>
            <li class="layui-nav-item"><a href="{:U('ShopCate/index')}">好店管理</a></li>
            <li class="layui-nav-item"><a href="{:U('Quan/index')}">同城圈管理</a></li>
            <li class="layui-nav-item"><a href="{:U('Member/index')}">用户管理</a></li>
            <li class="layui-nav-item"><a href="{:U('Home/Index/index')}">切换小程序</a></li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="{$Think.session.wechat.headimg}" class="layui-nav-img">
                    {$Think.session.wechat.nickname}
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="{:U('Home/Index/index')}">切换小程序</a></dd>
                    <!-- <dd><a href="">安全设置</a></dd> -->
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="{$Think.session.headimgurl}" class="layui-nav-img">
                    {$Think.session.nickname}
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="{:U('Home/Public/logout')}">退出登录</a></dd>
                    <!-- <dd><a href="">安全设置</a></dd> -->
                </dl>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                <li class="layui-nav-item"><a href="{:U('Index/index')}">数据统计</a></li>
                <li class="layui-nav-item ">
                    <a class="" href="javascript:;">店铺装修</a>
                    <dl class="layui-nav-child">
                        <dd class=""><a href="{:U('Adv/shopAdv',array('status'=>0))}">&nbsp;&nbsp;&nbsp;&nbsp;开屏广告</a></dd>
                        <dd class=""><a href="{:U('Adv/homeFlash',array('status'=>1))}">&nbsp;&nbsp;&nbsp;&nbsp;首页轮播展示</a></dd>
                        <dd class=""><a href="{:U('Index/modular')}">&nbsp;&nbsp;&nbsp;&nbsp;首页模块管理</a></dd>
                        <dd class=""><a href="{:U('Index/cateNav')}">&nbsp;&nbsp;&nbsp;&nbsp;首页顶部导航管理</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item ">
                    <a class="" href="javascript:;">商家提现审核</a>
                    <dl class="layui-nav-child">
                        <dd class=""><a href="{:U('Withdraw/index',array('status'=>0))}">待审核</a></dd>
                        <dd><a href="{:U('Withdraw/index',array('status'=>1))}">待打款</a></dd>
                        <dd><a href="{:U('Withdraw/index',array('status'=>2))}">已打款</a></dd>
                        <dd><a href="{:U('Withdraw/index',array('status'=>3))}">失效</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item "><a href="{:U('Index/refundlist')}">拼团退款记录</a></li>
                <li class="layui-nav-item"><a href="{:U('Index/gobal')}">全局配置</a></li>
                <li class="layui-nav-item"><a href="{:U('Join/index')}">商家入驻费</a></li>
                <li class="layui-nav-item"><a href="{:U('Top/index')}">置顶收费</a></li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">分销中心</a>
                    <dl class="layui-nav-child">
                        <dd class="layui-this"><a href="{:U('Index/commission')}">佣金比例设置</a></dd>
                        <dd class=""><a href="{:U('Commission/set')}">基础设置</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item"><a href="{:U('Adv/index')}">广告管理</a></li>
                <li class="layui-nav-item"><a href="{:U('Index/pay')}">支付配置</a></li>
                <li class="layui-nav-item "><a href="{:U('Index/template')}">模板消息设置</a></li>
                <li class="layui-nav-item"><a href="{:U('Index/fabu')}">小程序发布</a></li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding:0 15px;">
            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend>佣金比例设置</legend>
            </fieldset>

            <!--<form class="layui-form" action="">-->
            <div style="margin-bottom: 16px;height: 10px;background-color: #92B8B1;"></div>
                <div class="layui-form-item" style="margin-bottom: 0;">
                    <label class="layui-form-label">商户入驻一级佣金 (%）</label>
                    <div class="layui-input-block">
                        <input id="shop_1" type="number" name="comm_shopin_one" lay-verify="required" placeholder="请输入1级佣金比例 (0.00~100.00)" autocomplete="off" class="layui-input" value="{$arr.comm_shopin_one}">
                    </div>
                </div>
                <div class="layui-form-item" style="margin-bottom: 0;">
                    <label class="layui-form-label">商户入驻二级佣金 (%）</label>
                    <div class="layui-input-block">
                        <input id="shop_2" type="number" name="comm_shopin_two" lay-verify="required" placeholder="请输入2级佣金比例 (0.00~100.00)" autocomplete="off" class="layui-input" value="{$arr.comm_shopin_two}">
                    </div>
                </div>
            <div style="margin-bottom: 16px;height: 10px;background-color: #92B8B1;"></div>
            <div class="layui-form-item" style="margin-bottom: 0;">
                <label class="layui-form-label">同城卡一级佣金 (%）</label>
                <div class="layui-input-block">
                    <input id="tcard_1" type="number" name="comm_tcard_one" lay-verify="required" placeholder="请输入1级佣金比例 (0.00~100.00)" autocomplete="off" class="layui-input" value="{$arr.comm_tcard_one}">
                </div>
            </div>
            <div class="layui-form-item" style="margin-bottom: 0;">
                <label class="layui-form-label">同城卡二级佣金 (%）</label>
                <div class="layui-input-block">
                    <input id="tcard_2" type="number" name="comm_tcard_two" lay-verify="required" placeholder="请输入2级佣金比例 (0.00~100.00)" autocomplete="off" class="layui-input" value="{$arr.comm_tcard_two}">
                </div>
            </div>
            <div style="margin-bottom: 16px;height: 10px;background-color: #92B8B1;"></div>
            <div class="layui-form-item" style="margin-bottom: 0;">
                <label class="layui-form-label">发布信息一级佣金 (%）</label>
                <div class="layui-input-block">
                    <input id="info_1" type="number" name="comm_info_one" lay-verify="required" placeholder="请输入1级佣金比例 (0.00~100.00)" autocomplete="off" class="layui-input" value="{$arr.comm_info_one}">
                </div>
            </div>
            <div class="layui-form-item" style="margin-bottom: 0;">
                <label class="layui-form-label">发布信息二级佣金 (%）</label>
                <div class="layui-input-block">
                    <input id="info_2" type="number" name="comm_info_two" lay-verify="required" placeholder="请输入2级佣金比例 (0.00~100.00)" autocomplete="off" class="layui-input" value="{$arr.comm_info_two}">
                </div>
            </div>
            <div style="margin-bottom: 16px;height: 10px;background-color: #92B8B1;"></div>
            <div class="layui-form-item" style="margin-bottom: 0;">
                <label class="layui-form-label">店铺升级一级佣金 (%）</label>
                <div class="layui-input-block">
                    <input id="shopup_1" type="number" name="comm_shopup_one" lay-verify="required" placeholder="请输入1级佣金比例 (0.00~100.00)" autocomplete="off" class="layui-input" value="{$arr.comm_shopup_one}">
                </div>
            </div>
            <div class="layui-form-item" style="margin-bottom: 0;">
                <label class="layui-form-label">店铺升级二级佣金 (%）</label>
                <div class="layui-input-block">
                    <input id="shopup_2" type="number" name="comm_shopup_two" lay-verify="required" placeholder="请输入2级佣金比例 (0.00~100.00)" autocomplete="off" class="layui-input" value="{$arr.comm_shopup_two}">
                </div>
            </div>
           <!-- <div style="margin-bottom: 16px;height: 10px;background-color: #92B8B1;"></div>
            <div class="layui-form-item" style="margin-bottom: 0;">
                <label class="layui-form-label">购买商品一级佣金 (%）</label>
                <div class="layui-input-block">
                    <input id="goods_1" type="number" name="comm_goods_one" lay-verify="required" placeholder="请输入1级佣金比例 (0.00~100.00)" autocomplete="off" class="layui-input" value="{$arr.comm_goods_one}">
                </div>
            </div>
            <div class="layui-form-item" style="margin-bottom: 0;">
                <label class="layui-form-label">购买商品二级佣金 (%）</label>
                <div class="layui-input-block">
                    <input id="goods_2" type="number" name="comm_goods_two" lay-verify="required" placeholder="请输入2级佣金比例 (0.00~100.00)" autocomplete="off" class="layui-input" value="{$arr.comm_goods_two}">
                </div>
            </div>-->
            <div style="margin-bottom: 16px;height: 10px;background-color: #92B8B1;"></div>

                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn tijiao" lay-submit="" lay-filter="*">立即提交</button>
                        <!-- <button type="reset" class="layui-btn layui-btn-primary">重置</button> -->
                    </div>
                </div>
            <!--</form>-->
        </div>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © 2017-2018 <a href="https://www.58zltc.com" target="_blank">智联同城</a> All Rights Reserved.
    </div>
</div>
<script src="__PUBLIC__/layui/layui.js" charset="utf-8"></script>
<script>
    layui.extend({
        areas: '__PUBLIC__/layui/lay/modules/areas' // {/}的意思即代表采用自有路径，即不跟随 base 路径
    })
    //JavaScript代码区域
    layui.use(['form','upload','element','laypage','layer'], function(){
        var element = layui.element
                ,$ = layui.jquery
                ,layer = layui.layer
                ,form = layui.form
                ,areas = layui.areas;

//        form.on('submit(*)', function(data){
//            $.post('#', data.field, function(e) {
//                layer.alert(e.info);
//            });
//            return false;
//        });
        $(".tijiao").click(function(){
            var data = {};
            data.comm_shopin_one = $("#shop_1").val();
            data.comm_shopin_two = $("#shop_2").val();
            data.comm_tcard_one = $("#tcard_1").val();
            data.comm_tcard_two = $("#tcard_2").val();
            data.comm_info_one = $("#info_1").val();
            data.comm_info_two = $("#info_2").val();
            data.comm_shopup_one = $("#shopup_1").val();
            data.comm_shopup_two = $("#shopup_2").val();
           /* data.comm_goods_one = $("#goods_1").val();
            data.comm_goods_two = $("#goods_2").val();*/
            $.post("/index.php/Tongcheng/Index/saveCommission", data, function (res) {
                console.log(res)
                if (res == 1) {
                    layer.alert('修改成功')
                } else {
                    layer.alert('未作修改或修改失败')
                }
                setTimeout(function(){
                    location.reload();
                },1000)
            })
        })
    });
</script>
</body>
</html>
